home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / AMAXSLEN.HDR < prev    next >
Text File  |  1994-04-25  |  1KB  |  46 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _AMaxStrLen( acArray ) --> nLongestStringLength
  8.  
  9. PARAMETERS:
  10.  
  11. acArray : array of characters
  12.  
  13. SHORT:
  14.  
  15. Determine the length of the longest string from an array of strings.
  16.  
  17. DESCRIPTION:
  18.  
  19. _AMaxStrLen() returns the length of the longest character string in an
  20. array of strings.
  21.  
  22. If the array is empty, the return value is 0. If any element of the array
  23. is not of type char, the return value is 0.
  24.  
  25. NOTE:
  26.  
  27. The return value does not necessarily uniquely identify any particular array
  28. element because two elements may have the same length.  This function only
  29. tells you how long the LONGEST element is.  In the case of a tie, it doesn't
  30. matter which.
  31.  
  32. See also: AMaxStrLen() which returns the element number associated with the
  33. longest string element.
  34.  
  35. EXAMPLE:
  36.  
  37. LOCAL aArray := { 'a', 'bbbbbbbbb', 'aaa', 'aaaaaaaaa', 'aa'}
  38. t = _AMaxStrLen( aArray )
  39.  
  40. Result: t = 9
  41.  
  42. Note that both the second element and the fourth element are both 9
  43. characters long.  The function returns 9 regardless.
  44.  
  45. ******************************************************************************/
  46.